package com.skeleton.db.entity;

import com.skeleton.db.dto.BlogArticleDto;
import com.skeleton.utils.SystemTools;

public class BlogArticle {

	private String blog_id;
	private String loginname;
	private String title;
	private String content;
	private String tags;
	private int create_dttm;
	private String create_ip;
	private int last_modify_dttm;
	private int visit_cnt;
	private int favour_cnt;
	private int collect_cnt;
	private char status;
	private int seq;

	public BlogArticleDto toDto() {
		BlogArticleDto dto = new BlogArticleDto();
		dto.setBlogId(blog_id);
		dto.setLoginname(loginname);
		dto.setBlogTitle(title);
		dto.setBlogContent(content);
		dto.setBlogTags(tags);
		dto.setBlogCreateDttm(create_dttm);
		dto.setBlogCreateDttmStr(SystemTools.formatDTTM(SystemTools.convertIntToDTTM(create_dttm)));
		dto.setBlogCreateIp(create_ip);
		dto.setBlogLastModifyDttm(last_modify_dttm);
		dto.setBlogLastModifyDttmStr(SystemTools.formatDTTM(SystemTools.convertIntToDTTM(last_modify_dttm)));
		dto.setBlogVisitCnt(visit_cnt);
		dto.setBlogFavourCnt(favour_cnt);
		dto.setBlogCollectCnt(collect_cnt);
		dto.setBlogStatus(status);
		dto.setBlogSeq(seq);
		return dto;
	}

	public String getBlog_id() {
		return blog_id;
	}

	public void setBlog_id(String blog_id) {
		this.blog_id = blog_id;
	}

	public String getLoginname() {
		return loginname;
	}

	public void setLoginname(String loginname) {
		this.loginname = loginname;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getTags() {
		return tags;
	}

	public void setTags(String tags) {
		this.tags = tags;
	}

	public int getCreate_dttm() {
		return create_dttm;
	}

	public void setCreate_dttm(int create_dttm) {
		this.create_dttm = create_dttm;
	}

	public String getCreate_ip() {
		return create_ip;
	}

	public void setCreate_ip(String create_ip) {
		this.create_ip = create_ip;
	}

	public int getLast_modify_dttm() {
		return last_modify_dttm;
	}

	public void setLast_modify_dttm(int last_modify_dttm) {
		this.last_modify_dttm = last_modify_dttm;
	}

	public int getVisit_cnt() {
		return visit_cnt;
	}

	public void setVisit_cnt(int visit_cnt) {
		this.visit_cnt = visit_cnt;
	}

	public int getFavour_cnt() {
		return favour_cnt;
	}

	public void setFavour_cnt(int favour_cnt) {
		this.favour_cnt = favour_cnt;
	}

	public int getCollect_cnt() {
		return collect_cnt;
	}

	public void setCollect_cnt(int collect_cnt) {
		this.collect_cnt = collect_cnt;
	}

	public char getStatus() {
		return status;
	}

	public void setStatus(char status) {
		this.status = status;
	}

	public int getSeq() {
		return seq;
	}

	public void setSeq(int seq) {
		this.seq = seq;
	}

}
